package com.learning.controller.teacher;

import com.learning.result.Result;
import com.learning.service.IAnalyzeService;
import com.learning.vo.AnalyzeVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/teacher/analyze")
@Slf4j
@Api(tags = "班级分析系统")
@RequiredArgsConstructor
public class AnalyzeController {

    private final IAnalyzeService analyzeService;

    @ApiOperation("得到错题分析子系统")
    @GetMapping("/getAnalysis")
    public Result<AnalyzeVO> getAnalysis(Long paperId){
        AnalyzeVO analysis = analyzeService.getAnalysis(paperId);
        return Result.success(analysis);
    }

}
